package com.luojialong.onlineJudge.judge.codesandbox;

import com.luojialong.onlineJudge.judge.codesandbox.model.ExecuteCodeRequest;
import com.luojialong.onlineJudge.judge.codesandbox.model.ExecuteCodeResponse;
import lombok.extern.slf4j.Slf4j;


@Slf4j
public class CodeSandboxProxy implements CodeSandBox{


    private final CodeSandBox codeSandBox;



    public CodeSandboxProxy(CodeSandBox codeSandBox) {
        this.codeSandBox = codeSandBox;
    }

    @Override
    public ExecuteCodeResponse executeCode(ExecuteCodeRequest executeCodeRequest) {
        log.info("代码沙箱请求信息---------" + executeCodeRequest.toString());
        ExecuteCodeResponse executeCodeResponse = codeSandBox.executeCode(executeCodeRequest);
        log.info("代码沙箱响应信息---------" + executeCodeResponse.toString());
        return executeCodeResponse;
    }
}
